import Vue from 'vue';
import VueRouter from 'vue-router';

import dictionary from '../utils/dictionary.js';

Vue.use(VueRouter);

const dict = dictionary.zh;//zh,en
//获取原型对象上的push函数
const originalPush = VueRouter.prototype.push;
//修改原型对象中的push方法
VueRouter.prototype.push = function push(location) {
	return originalPush.call(this, location).catch(err => err);
};


export default new VueRouter({
	routes: [{
			path: '/', // 程序启动默认路由
			component: () => import('../components/common/Whole.vue'),
			meta: {
				title: '整体页面布局'
			},
			redirect: '/Home', // 重定向到
			children: [{
				path: '/Home',
				name: dict.home,
				component: () => import('../page/Home.vue'),
				meta: {
					title: dict.home
				}
			}, ]
		},
		{
			path: '/Home',
			name: dict.home,
			component: () => import('../page/Home.vue'),
			meta: {
				title: dict.home
			}
		},
		{
			path: '/search',
			name: dict.search,
			component: () => import('../page/search.vue'),
			meta: {
				title: dict.search
			}
		},
		{
			path: '/test',
			name: 'test',
			component: () => import('../page/test.vue'),
			meta: {
				title: "test"
			}
		},
		// -----------------------------------------党建引领---------------------------------------------
		{
			//党建引领
			path: '/partyBuildingLeads',
			name: dict.partyBuildingLeads,
			component: () => import('../page/partyBuildingLeads/partyBuildingInformation.vue'),
			meta: {
				title: dict.partyBuildingLeads
			}
		},
		{
			//党建资讯
			path: '/partyBuildingInformation',
			name: dict.partyBuildingInformation,
			component: () => import('../page/partyBuildingLeads/partyBuildingInformation.vue'),
			meta: {
				title: dict.partyBuildingInformation
			}
		},
		{
			//党建引领-查看更多-新闻列表
			path: '/partyBuildingInNewsList',
			name: dict.partyBuildingInNewsList,
			component: () => import('../page/partyBuildingLeads/newsList.vue'),
			meta: {
				title: dict.more
			}
		},
		{
			//党建引领-查看更多-新闻列表
			path: '/partyBuildingInNewsDetail',
			name: dict.partyBuildingInNewsDetail,
			component: () => import('../page/partyBuildingLeads/newsDetail.vue'),
			meta: {
				title: dict.more,
				keepAlive:true
			}
		},
		{
			// 组织建设
			path: '/organizationBuilding',
			name: dict.organizationBuilding,
			component: () => import('../page/partyBuildingLeads/organizationBuilding.vue'),
			meta: {
				title: dict.organizationBuilding
			}
		},
		{
			//党员活动
			path: '/partyMemberActivities',
			name: dict.partyMemberActivities,
			component: () => import('../page/partyBuildingLeads/partyMemberActivities.vue'),
			meta: {
				title: dict.partyMemberActivities
			}
		},
		{
			//党员活动-详情页面
			path: '/partyMemberActivitiesDetail',
			name: dict.partyMemberActivitiesDetail,
			component: () => import('../page/partyBuildingLeads/activitieDetail.vue'),
			meta: {
				title: dict.partyMemberActivitiesDetail
			}
		},
		// ------------------------------------------企业概括-------------------------------------------
		{
			// 企业概括
			path: '/corporateOverview',
			name: dict.corporateOverview,
			component: () => import('../page/corporateOverview/companyProfile.vue'),
			meta: {
				title: dict.companyProfile
			}
		},
		{
			// 企业概括
			path: '/corporateOverview',
			name: dict.aboutGTTG,
			component: () => import('../page/corporateOverview/companyProfile.vue'),
			meta: {
				title: dict.companyProfile
			}
		},
		{
			// 企业简介
			path: '/companyProfile',
			name: dict.companyProfile,
			component: () => import('../page/corporateOverview/companyProfile.vue'),
			meta: {
				title: dict.companyProfile
			}
		},
		{
			//企业荣誉
			path: '/corporateHonor',
			name: dict.corporateHonor,
			component: () => import('../page/corporateOverview/corporateHonor.vue'),
			meta: {
				title: dict.corporateHonor
			}
		},
		{
			//企业荣誉详情
			path: '/corporateHonorInfo',
			name: dict.corporateHonorInfo,
			component: () => import('../page/corporateOverview/corporateHonorInfo.vue'),
			meta: {
				title: dict.corporateHonorInfo
			}
		},
		{
			// 发展历程
			path: '/developmentHistory',
			name: dict.developmentHistory,
			component: () => import('../page/corporateOverview/developmentHistory.vue'),
			meta: {
				title: dict.developmentHistory
			}
		},
		{
			// 发展历程
			path: '/developmentHistoryInfo',
			name: dict.developmentHistoryInfo,
			component: () => import('../page/corporateOverview/developmentHistoryInfo.vue'),
			meta: {
				title: dict.developmentHistoryInfo
			}
		},
		{
			// 企业文化
			path: '/companyCulture',
			name: dict.companyCulture,
			component: () => import('../page/corporateOverview/companyCulture.vue'),
			meta: {
				title: dict.companyCulture
			}
		},
		// ------------------------------------------企业新闻-------------------------------------------
		{
			//企业新闻
			path: '/corporateNews',
			name: dict.corporateNews,
			component: () => import('../page/corporateNews/enterpriseDynamics.vue'),
			meta: {
				title: dict.corporateNews
			}
		},
		{
			//企业新闻-企业动态
			path: '/enterpriseDynamics',
			name: dict.enterpriseDynamics,
			component: () => import('../page/corporateNews/enterpriseDynamics.vue'),
			meta: {
				title: dict.enterpriseDynamics
			}
		},
		{
			//企业新闻-企业动态-查看更多
			path: '/enterpriseDynamicsList',
			name: dict.enterpriseDynamicsList,
			component: () => import('../page/corporateNews/enterpriseDynamicsList.vue'),
			meta: {
				title: dict.enterpriseDynamicsList
			}
		},
		
		{
			//企业新闻-企业动态-查看详情
			path: '/enterpriseDynamicsDetail',
			name: dict.enterpriseDynamicsDetail,
			component: () => import('../page/corporateNews/enterpriseDynamicsDetail.vue'),
			meta: {
				title: dict.enterpriseDynamicsDetail
			}
		},
		{
			//企业新闻-公告公示
			path: '/publicAnnouncement',
			name: dict.publicAnnouncement,
			component: () => import('../page/corporateNews/publicAnnouncement.vue'),
			meta: {
				title: dict.publicAnnouncement
			}
		},
		{
			//企业新闻-公告公示-查看详情
			path: '/publicAnnouncementDetail',
			name: dict.publicAnnouncementDetail,
			component: () => import('../page/corporateNews/publicAnnouncementDetail.vue'),
			meta: {
				title: dict.publicAnnouncementDetail
			}
		},
		{
			//企业新闻-视频展示
			path: '/videoDisplay',
			name: dict.videoDisplay,
			component: () => import('../page/corporateNews/videoDisplay.vue'),
			meta: {
				title: dict.videoDisplay
			}
		},
		{
			//企业新闻-视频展示-详情
			path: '/videoDisplayDetail',
			name: dict.videoDisplayDetail,
			component: () => import('../page/corporateNews/videoDisplayDetail.vue'),
			meta: {
				title: dict.videoDisplayDetail
			}
		},
		// ------------------------------------------产品与服务-------------------------------------------
		{
			//产品与服务
			path: '/productsAndServices',
			name: dict.productsAndServices,
			component: () => import('../page/productsAndServices/companyStrength.vue'),
			meta: {
				title: dict.productsAndServices
			}
		},
		{
			//产品与服务-企业实力
			path: '/companyStrength',
			name: dict.companyStrength,
			component: () => import('../page/productsAndServices/companyStrength.vue'),
			meta: {
				title: dict.companyStrength
			}
		},
		{
			//产品与服务-主营产品
			path: '/mainProducts',
			name: dict.mainProducts,
			component: () => import('../page/productsAndServices/mainProducts.vue'),
			meta: {
				title: dict.mainProducts
			}
		},
		{
			//产品与服务-主营产品-详情
			path: '/mainProductsInfo',
			name: dict.mainProductsInfo,
			component: () => import('../page/productsAndServices/mainProductsInfo.vue'),
			meta: {
				title: dict.mainProductsInfo
			}
		},
		{
			//产品与服务-科技研发
			path: '/scientificResearch',
			name: dict.scientificResearch,
			component: () => import('../page/productsAndServices/scientificResearch.vue'),
			meta: {
				title: dict.scientificResearch
			}
		},
		{
			//产品与服务-科技研发
			path: '/scientificResearchInfo',
			name: dict.scientificResearchInfo,
			component: () => import('../page/productsAndServices/scientificResearchInfo.vue'),
			meta: {
				title: dict.scientificResearchInfo
			}
		},
		{
			//产品与服务-销售公告
			path: '/saleAnnouncements',
			name: dict.saleAnnouncements,
			component: () => import('../page/productsAndServices/saleAnnouncements.vue'),
			meta: {
				title: dict.saleAnnouncements
			}
		},
		{
			//产品与服务-销售公告
			path: '/saleAnnouncementsInfo',
			name: dict.saleAnnouncementsInfo,
			component: () => import('../page/productsAndServices/saleAnnouncementsInfo.vue'),
			meta: {
				title: dict.saleAnnouncementsInfo
			}
		},
		{
			//产品与服务-销售区域
			path: '/salesArea',
			name: dict.salesArea,
			component: () => import('../page/productsAndServices/salesArea.vue'),
			meta: {
				title: dict.salesArea
			}
		},
		// ------------------------------------------可持续发展-------------------------------------------
		{
			//可持续发展
			path: '/sustainableDevelopment',
			name: dict.sustainableDevelopment,
			component: () => import('../page/sustainableDevelopment/greenDevelopment.vue'),
			meta: {
				title: dict.greenDevelopment
			}
		}, {
			//绿色发展
			path: '/greenDevelopment',
			name: dict.greenDevelopment,
			component: () => import('../page/sustainableDevelopment/greenDevelopment.vue'),
			meta: {
				title: dict.greenDevelopment
			}
		},{
			//绿色发展-详情
			path: '/greenDevelopmentInfo',
			name: dict.greenDevelopmentInfo,
			component: () => import('../page/sustainableDevelopment/greenDevelopmentInfo.vue'),
			meta: {
				title: dict.greenDevelopmentInfo
			}
		},
		{
			//环保信息
			path: '/environmentalInformation',
			name: dict.environmentalInformation,
			component: () => import('../page/sustainableDevelopment/environmentalInformation.vue'),
			meta: {
				title: dict.environmentalInformation
			}
		},
		{
			//环保信息详情
			path: '/environmentalInformationInfo',
			name: dict.environmentalInformationInfo,
			component: () => import('../page/sustainableDevelopment/environmentalInformationInfo.vue'),
			meta: {
				title: dict.environmentalInformationInfo
			}
		},
		// ------------------------------------------采购信息-------------------------------------------
		{
			//采购信息
			path: '/procurementInformation',
			name: dict.procurementInformation,
			component: () => import('../page/procurementInformation/importantAnnouncement.vue'),
			meta: {
				title: dict.procurementInformation
			}
		},
		{
			//采购信息
			path: '/procurementInformation',
			name: dict.BiddingProcurement,
			component: () => import('../page/procurementInformation/importantAnnouncement.vue'),
			meta: {
				title: dict.procurementInformation
			}
		},
		{
			//采购信息-重要公告
			path: '/importantAnnouncement',
			name: dict.importantAnnouncement,
			component: () => import('../page/procurementInformation/importantAnnouncement.vue'),
			meta: {
				title: dict.importantAnnouncement
			}
		},
		{
			//采购信息-重要公告-详情
			path: '/importantAnnouncementInfo',
			name: dict.importantAnnouncementInfo,
			component: () => import('../page/procurementInformation/importantAnnouncementInfo.vue'),
			meta: {
				title: dict.importantAnnouncementInfo
			}
		},
		{
			//采购信息-招标公告
			path: '/tenderAnnouncement',
			name: dict.tenderAnnouncement,
			component: () => import('../page/procurementInformation/tenderAnnouncement.vue'),
			meta: {
				title: dict.tenderAnnouncement
			}
		},
		{
			//采购信息-招标公告-详情
			path: '/tenderAnnouncementInfo',
			name: dict.tenderAnnouncementInfo,
			component: () => import('../page/procurementInformation/tenderAnnouncementInfo.vue'),
			meta: {
				title: dict.tenderAnnouncementInfo
			}
		},
		{
			//采购信息-中标公告
			path: '/bidAnnouncement',
			name: dict.bidAnnouncement,
			component: () => import('../page/procurementInformation/bidAnnouncement.vue'),
			meta: {
				title: dict.bidAnnouncement
			}
		},
		{
			//采购信息-中标公告-详情
			path: '/bidAnnouncementInfo',
			name: dict.bidAnnouncementInfo,
			component: () => import('../page/procurementInformation/bidAnnouncementInfo.vue'),
			meta: {
				title: dict.bidAnnouncementInfo
			}
		},
		{
			//采购信息-流标公告-详情
			path: '/failedBidAnnouncementInfo',
			name: dict.failedBidAnnouncementInfo,
			component: () => import('../page/procurementInformation/failedBidAnnouncementInfo.vue'),
			meta: {
				title: dict.failedBidAnnouncementInfo
			}
		},
		{
			//采购信息-流标公告
			path: '/failedBidAnnouncement',
			name: dict.failedBidAnnouncement,
			component: () => import('../page/procurementInformation/failedBidAnnouncement.vue'),
			meta: {
				title: dict.failedBidAnnouncement
			}
		},
		// ------------------------------------------人才中心-------------------------------------------
		{
			//人才中心
			path: '/centreOfExcellence',
			name: dict.centreOfExcellence,
			component: () => import('../page/centreOfExcellence/talentConcept.vue'),
			meta: {
				title: dict.centreOfExcellence
			}
		},
		{
			//人才中心-人才理念
			path: '/talentConcept',
			name: dict.talentConcept,
			component: () => import('../page/centreOfExcellence/talentConcept.vue'),
			meta: {
				title: dict.talentConcept
			}
		},
		{
			//人才中心-薪酬福利
			path: '/compensationAndBenefits',
			name: dict.compensationAndBenefits,
			component: () => import('../page/centreOfExcellence/compensationAndBenefits.vue'),
			meta: {
				title: dict.compensationAndBenefits
			}
		},
		{
			//人才中心-职业发展
			path: '/professionalGrowth',
			name: dict.professionalGrowth,
			component: () => import('../page/centreOfExcellence/professionalGrowth.vue'),
			meta: {
				title: dict.professionalGrowth
			}
		},
		{
			//人才中心-人力公告
			path: '/manpowerAnnouncement',
			name: dict.manpowerAnnouncement,
			component: () => import('../page/centreOfExcellence/manpowerAnnouncement.vue'),
			meta: {
				title: dict.manpowerAnnouncement
			}
		},
		{
			//人才中心-人力公告-详情
			path: '/manpowerAnnouncementInfo',
			name: dict.manpowerAnnouncementInfo,
			component: () => import('../page/centreOfExcellence/manpowerAnnouncementInfo.vue'),
			meta: {
				title: dict.manpowerAnnouncementInfo
			}
		},
		{
			//人才中心-招聘信息
			path: '/recruitmentInformation',
			name: dict.recruitmentInformation,
			component: () => import('../page/centreOfExcellence/recruitmentInformation.vue'),
			meta: {
				title: dict.recruitmentInformation
			}
		},
		{
			//人才中心-招聘信息
			path: '/recruitmentInformationInfo',
			name: dict.recruitmentInformationInfo,
			component: () => import('../page/centreOfExcellence/recruitmentInformationInfo.vue'),
			meta: {
				title: dict.recruitmentInformationInfo
			}
		},
		{
			//人才中心-联系我们
			path: '/ceContactUs',
			name: dict.ceContactUs,
			component: () => import('../page/centreOfExcellence/ceContactUs.vue'),
			meta: {
				title: dict.ceContactUs
			}
		},
		// ------------------------------------------联系我们-------------------------------------------
		{
			//联系我们
			path: '/contactUs',
			name: dict.contactUs,
			component: () => import('../page/contactUs/contactDetails.vue'),
			meta: {
				title: dict.contactUs
			}
		},
		{
			//联系我们-联系方式
			path: '/contactUs',
			name: dict.contactDetails,
			component: () => import('../page/contactUs/contactDetails.vue'),
			meta: {
				title: dict.contactDetails
			}
		},
		{
			//联系我们-投诉建议
			path: '/complaintsAndSuggestions',
			name: dict.complaintsAndSuggestions,
			component: () => import('../page/contactUs/complaintsAndSuggestions.vue'),
			meta: {
				title: dict.complaintsAndSuggestions
			}
		},
		{
			path: '/404',
			name: '404',
			component: () => import('../page/404.vue'),
			meta: {
				title: '404'
			}
		},
		{
			path: '/403',
			name: '403',
			component: () => import('../page/403.vue'),
			meta: {
				title: '403'
			}
		},
		{
			path: '*',
			redirect: '/404'
		}
	]
});
